<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1 {
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .div2 {
            width: 150px;
            height: 150px;
            background-color: green;
        }
        .div3 {
            width: 100px;
            height: 100px;
            background-color: yellowgreen;
        }
    </style>
</head>
<body>
    <div id="div">
        <p>@keyup.enter 按下回车键 才会执行代码</p>
        <input type="text" v-model="msg1" @keyup.a="showKey">
        <hr>
        <hr>
        <p>系统修饰键</p>
        <p>@keyup.shift.q 同时按下指定的键才会生效</p>
        <input type="text" @keyup.shift.q="showMsg">
        <hr>
        <p>鼠标修饰符</p>
        <div class="div3" @click.right="show"></div>
    </div>
    <script src="../vue.js"></script>
    <script>
        let vm = new Vue({
            el: '#div',
            data: {
                msg1: ''
            },
            methods: {
                showKey($event) {
                    console.log($event);
                },
                showMsg() {
                    console.log(666);
                },
                show() {
                    console.log('click');
                }
            }
        })
    </script>
</body>
</html>